import { Component, ViewChild, TemplateRef, ChangeDetectionStrategy } from '@angular/core';
import { NotificationService } from '@iux/live';

@Component({
  templateUrl: './basic.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BasicComponent {
  @ViewChild('contentTpl', { static: false }) contentTpl: TemplateRef<any>;

  constructor(private notice: NotificationService) {}

  topRight(): void {
    this.notice.create({
      lvTitle: 'This is a title',
      lvContent: this.contentTpl,
      lvPosition: 'topRight',
    });
  }
}
